package com.ledi.guns.common.persistence.model;

import java.io.Serializable;
import java.util.Date;

import lombok.ToString;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * 文件名称： com.ledi.guns.common.persistence.model.User.java<br/>
 * 初始作者： 钟小平<br/>
 * 创建日期： 2017年11月28日<br/>
 * 功能说明： 用户表 <br/>
 * =================================================<br/>
 * 修改记录：<br/>
 * 修改作者 日期 修改内容<br/>
 * ================================================<br/>
 * Copyright (乐迪教育科技有限公司-幼儿事业部) 2017-2018.All rights reserved.<br/>
 */
@ToString
@TableName("t_user")
public class User extends Model<User> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;
	/**
	 * 头像
	 */
	private String avatar;
	/**
	 * 账号
	 */
	private String account;
	/**
	 * 密码
	 */

	private String password;
	/**
	 * md5密码盐
	 */
	private String salt;
	/**
	 * 名字
	 */
	private String name;
	/**
	 * 生日
	 */
	private Date birthday;
	/**
	 * 性别（1：男 2：女）
	 */
	private Integer sex;
	/**
	 * 电子邮件
	 */
	private String email;
	/**
	 * 电话
	 */
	private String phone;
	/**
	 * 角色id
	 */
	private String roleid;
	/**
	 * 部门id
	 */
	private Integer deptid;
	/**
	 * 状态(1：启用 2：冻结 3：删除）
	 */
	private Integer status;
	/**
	 * 创建时间
	 */
	private Date createtime;
	/**
	 * 保留字段
	 */
	@Version
	private Integer version;

	@TableField(value = "school_id", strategy = FieldStrategy.IGNORED)
	private Long schoolId;

	@TableField(value = "agent_id", strategy = FieldStrategy.IGNORED)
	private Long agentId;

	private String alipayPid;

	private Integer createid;

	private String comment;

	private Integer updateid;
	private Date updatetime;

	public String getAlipayPid() {

		return alipayPid;
	}

	public void setAlipayPid(String alipayPid) {

		this.alipayPid = alipayPid;
	}

	public Long getSchoolId() {

		return schoolId;
	}

	public void setSchoolId(Long schoolId) {

		this.schoolId = schoolId;
	}

	public Long getAgentId() {

		return agentId;
	}

	public void setAgentId(Long agentId) {

		this.agentId = agentId;
	}

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {

		this.id = id;
	}

	public String getAvatar() {

		return avatar;
	}

	public void setAvatar(String avatar) {

		this.avatar = avatar;
	}

	public String getAccount() {

		return account;
	}

	public void setAccount(String account) {

		this.account = account;
	}

	public String getPassword() {

		return password;
	}

	public void setPassword(String password) {

		this.password = password;
	}

	public String getSalt() {

		return salt;
	}

	public void setSalt(String salt) {

		this.salt = salt;
	}

	public String getName() {

		return name;
	}

	public void setName(String name) {

		this.name = name;
	}

	public Date getBirthday() {

		return birthday;
	}

	public void setBirthday(Date birthday) {

		this.birthday = birthday;
	}

	public Integer getSex() {

		return sex;
	}

	public void setSex(Integer sex) {

		this.sex = sex;
	}

	public String getEmail() {

		return email;
	}

	public void setEmail(String email) {

		this.email = email;
	}

	public String getPhone() {

		return phone;
	}

	public void setPhone(String phone) {

		this.phone = phone;
	}

	public String getRoleid() {

		return roleid;
	}

	public void setRoleid(String roleid) {

		this.roleid = roleid;
	}

	public Integer getDeptid() {

		return deptid;
	}

	public void setDeptid(Integer deptid) {

		this.deptid = deptid;
	}

	public Integer getStatus() {

		return status;
	}

	public void setStatus(Integer status) {

		this.status = status;
	}

	public Date getCreatetime() {

		return createtime;
	}

	public void setCreatetime(Date createtime) {

		this.createtime = createtime;
	}

	public Integer getVersion() {

		return version;
	}

	public void setVersion(Integer version) {

		this.version = version;
	}

	@Override
	protected Serializable pkVal() {

		return id;
	}

	public Integer getCreateid() {

		return createid;
	}

	public void setCreateid(Integer createid) {

		this.createid = createid;
	}

	public String getComment() {

		return comment;
	}

	public void setComment(String comment) {

		this.comment = comment;
	}

	public Integer getUpdateid() {

		return updateid;
	}

	public void setUpdateid(Integer updateid) {

		this.updateid = updateid;
	}

	public Date getUpdatetime() {

		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {

		this.updatetime = updatetime;
	}

}
